<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <title>编辑商品</title>
</head>
<body style="padding: 20px">
<div> 编辑商品</div>
<form id="sku-form" class="form-horizontal" role="form" data-toggle="validator" method="POST" action="">
    <div style="display: flex">
        <div><img src="{$goods.image}" alt="" style="width: 150px;height: 150px"></div>
        <div style="padding: 20px">
            <div style="height: 50px;line-height: 50px"> {$goods.title}</div>
            <div style="height: 50px;line-height: 50px">商品id: {$goods.id}</div>
            <div style="height: 50px;line-height: 50px">类型：
                {switch $goods.gdtype }
                {case 0 }商品{/case}
                {case 1}服务{/case}
                {/switch}
            </div>
        </div>
    </div>
    <table class="table table-bordered">
        <thead>
        <tr>
            <th scope="col">规格名称</th>
            <th scope="col">sku编号</th>
            <th scope="col">单位</th>
            <th scope="col">当前库存</th>

            <th scope="col">库存数量</th>
        </tr>
        </thead>
        <tbody>
        {volist name="row" id="vo"}
        <tr>
            <th scope="row"> {$vo.difference}</th>
            <td>{$vo.code}</td>
            <td>{$goods.unit}</td>
            <td>{$vo.quantity}</td>
            <td>
                <div class="input-group">
                     <span class="input-group-btn">
                       <button class="btn btn-default min" type="button">-</button>
                     </span>
                      <input type="text" class="form-control" name="row[num][{$vo.sku_id}]"  value="{$vo.quantity}">
                     <span class="input-group-btn">
                       <button class="btn btn-default add" type="button">+</button>
                     </span>
                </div>
            </td>
        </tr>
        {/volist}
        </tbody>
    </table>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-1 " style="width: 10%;">补录时间:</label>
        <div class="col-xs-12 col-sm-2">
            <input id="c-updatetime" class="form-control datetimepicker" data-date-format="YYYY-MM-DD HH:mm" data-use-current="true" name="row[updatetime]" type="text" value="{:date('Y-m-d HH:mm')}">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-1" style="width: 10%;">变更备注:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-remarks" class="form-control" name="row[remarks]" type="text" value="">
        </div>
    </div>

    <div class="form-group layer-footer">
        <label class="control-label col-xs-12 col-sm-2"></label>
        <div class="col-xs-12 col-sm-8">
            <button type="submit" class="btn btn-primary btn-embossed disabled">{:__('OK')}</button>
        </div>
    </div>
</form>

</body>
</html>
